Skip to content

Make more things protected#350

Merged
ValerianRey merged 9 commits intomainfrom
make-internal-modules-protected
May 24, 2025
Merged

Make more things protected#350
ValerianRey merged 9 commits intomainfrom
make-internal-modules-protected

Conversation

@ValerianRey
Copy link
Copy Markdown
Contributor

@ValerianRey ValerianRey commented May 24, 2025

  • Make Aggregator modules protected
  • Make WeightedAggregator and GramianWeightedAggregator public
  • Make autojac modules protected
  • Make autojac protected
  • Make Transforms protected
  • Update rst files to use the new paths for newly protected modules
  • Add changelog entry

@ValerianRey ValerianRey added cc: refactor Conventional commit type for any refactoring, not user-facing, and not typing or perf improvements breaking-change This PR introduces a breaking change. labels May 24, 2025
@ValerianRey ValerianRey self-assigned this May 24, 2025
@ValerianRey ValerianRey added cc: refactor Conventional commit type for any refactoring, not user-facing, and not typing or perf improvements breaking-change This PR introduces a breaking change. labels May 24, 2025
@ValerianRey ValerianRey requested a review from PierreQuinton May 24, 2025 12:32
@codecov
Copy link
Copy Markdown

codecov bot commented May 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
src/torchjd/__init__.py 100.00% <100.00%> (ø)
src/torchjd/_autojac/__init__.py 100.00% <100.00%> (ø)
src/torchjd/_autojac/_backward.py 100.00% <100.00%> (ø)
src/torchjd/_autojac/_mtl_backward.py 100.00% <100.00%> (ø)
src/torchjd/_autojac/_transform/__init__.py 100.00% <100.00%> (ø)
src/torchjd/_autojac/_transform/_accumulate.py 100.00% <100.00%> (ø)
src/torchjd/_autojac/_transform/_aggregate.py 100.00% <100.00%> (ø)
src/torchjd/_autojac/_transform/_base.py 100.00% <100.00%> (ø)
src/torchjd/_autojac/_transform/_diagonalize.py 100.00% <100.00%> (ø)
src/torchjd/_autojac/_transform/_differentiate.py 100.00% <100.00%> (ø)
... and 28 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ValerianRey
Copy link
Copy Markdown
Contributor Author

ValerianRey commented May 24, 2025

@PierreQuinton should we even make the autojac package protected?

Even with this PR, there are still two ways to import backward (and same for mtl_backward):

from torchjd import backward
from torchjd.autojac import backward

(IMO yes, but I'd like to know your opinion on this too).

@PierreQuinton
Copy link
Copy Markdown
Contributor

@PierreQuinton should we even make the autojac package protected?

Even with this PR, there are still two ways to import backward (and same for mtl_backward):

from torchjd import backward
from torchjd.autojac import backward

(IMO yes, but I'd like to know your opinion on this too).

Yes this is preferable.

@ValerianRey ValerianRey changed the title make internal modules protected Make more things protected May 24, 2025
@ValerianRey ValerianRey merged commit 6c09b99 into main May 24, 2025
16 checks passed
@ValerianRey ValerianRey deleted the make-internal-modules-protected branch May 24, 2025 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change This PR introduces a breaking change. cc: refactor Conventional commit type for any refactoring, not user-facing, and not typing or perf improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants